<?php
namespace Admin\Controller;
use Think\Controller;
/**
 * 文章控制器
 */
class ArticleController extends AdminController{
    public $pagesize=10;

    public function articleList(){
        $count=M('article')->count();
        $page = new \Think\Page($count,$this->pagesize);
        $page ->setConfig('theme',"%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%");
        $show= $page->show(); //分页显示输出
        $list=M('article')->limit($page->firstRow.','.$page->listRows)->select();

        $this->assign('_page',$show);
        $this->assign('_list',$list);
        $this->display('article_list');
    }
}